package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 设备管理
 *
 * @author ruoyi
 */
@Data
@ApiModel("设备管理表")
public class SysDevice implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "设备ID", required = true)
    private long deviceId;

    @ApiModelProperty(value = "设备标识", required = true)
    private String deviceIdentifier;

    @ApiModelProperty(value = "设备型号", required = true)
    private String deviceModel;

    @ApiModelProperty(value = "设备状态（0空闲 1已租用）", required = true)
    private String deviceStatus;

    @ApiModelProperty(value = "绑定用户ID")
    private Long bindUserId;

    @ApiModelProperty(value = "areaId")
    private Long areaId;

    @ApiModelProperty(value = "连接状态（0离线 1在线）", required = true)
    private String connectionStatus;

    @ApiModelProperty(value = "佩戴状态（0未佩戴 1已佩戴）", required = true)
    private String wearStatus;

    @ApiModelProperty(value = "电量状态， 1=缺电报警; 2=关机报警 ; 3=自 动关机报警 ; 4=开机报警,5=设备充电，6=电 源已断开 7=设备电量已充满")
    private String powerStatus;

    @ApiModelProperty(value = "电量", required = true)
    private Integer batteryLevel;

    @ApiModelProperty(value = "可续航时间（小时）", required = true)
    private Integer remainingTime;

    @ApiModelProperty(value = "故障状态（0正常 1故障）", required = true)
    private String faultStatus;

    @ApiModelProperty(value = "故障原因")
    private String faultReason;

    @ApiModelProperty(value = "最新上报时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastHeartbeatTime;
}